]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Revert "StThemeNodeDrawing: fill background behind translucent gradients"
authorRay Strode <rstrode@redhat.com>
Tue, 15 Feb 2011 22:00:22 +0000 (17:00 -0500)
committerRay Strode <rstrode@redhat.com>
Wed, 16 Feb 2011 00:57:52 +0000 (19:57 -0500)
This reverts commit b4ec342d0603f1dc39cdadec62d9dcd7ec49f17d.

The alpha > 0 checks should actually be alpha < 255 for the commit to
make sense as designed. The design isn't right either, though,
since we need to preserve the translucency in translucent gradients,
not block it with a solid color fill.

https://bugzilla.gnome.org/show_bug.cgi?id=640465

src/st/st-theme-node-drawing.c

index 777c36a9798a479911d67ada0882dbeb763c315f..088ab483a0cbb9f3dfbb95afb35d4596caa8c23f 100644 (file)
@@ -452,8 +452,7 @@ st_theme_node_has_visible_outline (StThemeNode *node)
 }
 
 static cairo_pattern_t *
-create_cairo_pattern_of_background_gradient (StThemeNode *node,
-                                             gboolean    *needs_background_fill)
+create_cairo_pattern_of_background_gradient (StThemeNode *node)
 {
   cairo_pattern_t *pattern;
 
@@ -483,12 +482,6 @@ create_cairo_pattern_of_background_gradient (StThemeNode *node,
                                      node->background_gradient_end.green / 255.,
                                      node->background_gradient_end.blue / 255.,
                                      node->background_gradient_end.alpha / 255.);
-  if (node->background_color.alpha > 0 ||
-      node->background_gradient_end.alpha > 0)
-    *needs_background_fill = TRUE;
-  else
-    *needs_background_fill = FALSE;
-
   return pattern;
 }
 
@@ -794,8 +787,8 @@ st_theme_node_render_background_with_border (StThemeNode *node)
    */
   if (node->background_gradient_type != ST_GRADIENT_NONE)
     {
-      pattern = create_cairo_pattern_of_background_gradient (node,
-                                                             &draw_solid_background);
+      pattern = create_cairo_pattern_of_background_gradient (node);
+      draw_solid_background = FALSE;
     }
   else
     {